package marina;

public class J01Account {

	public static double getMonthlyInterestRate(double interestRate) {
		double gmir = interestRate / 12;
		return gmir;
	}

	public static int withDraw(int balance, int draw) {
		int wDraw = balance - draw;
		return wDraw;
	}

	public static int deposit(int balance, int add) {
		int depo = balance + add;
		return depo;
	}

	public static void main(String[] args) {

		String aid = "0";
		int balance = 0;
		double interestRate = 0;
		String dateCreated = "";
		int draw;
		int add;

		System.out.println("초기값");
		System.out.println("계좌번호 : " + aid);
		System.out.println("통장잔액 : " + balance);
		System.out.println("월간 이자율 : " + getMonthlyInterestRate(interestRate));
		System.out.println("통장 개설 날짜 : " + dateCreated);

		aid = "1122";
		balance = 20000;
		interestRate = 4.5;
		dateCreated = "/";
		draw = 2500;
		add = 3000;

		System.out.println("시험값");
		System.out.println("계좌번호 : " + aid);
		System.out.println("통장잔액 : " + balance);
		System.out.println("월간 이자율 : " + getMonthlyInterestRate(interestRate));
		System.out.println("통장 개설 날짜 : " + dateCreated);
		System.out.println("인출 결과 : " + withDraw(balance, draw));
		System.out.println("예금 결과 : " + deposit(balance, add));
	}
}
